package com.marketingexpert.controller.usermgnt;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.marketingexpert.service.usermgnt.UserService;

public class DeleteUserController implements Controller {

	private UserService userService;
	
	private String deleteSucc;
	
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String userId = request.getParameter("userId");
		
		getUserService().deleteUserById(userId);
		
		return new ModelAndView(getDeleteSucc());
	}

	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public String getDeleteSucc() {
		return deleteSucc;
	}

	public void setDeleteSucc(String deleteSucc) {
		this.deleteSucc = deleteSucc;
	}
	
	

}
